#include "ccube.h"

CCube::CCube():length(1), width(1), height(1)
{
}

CCube::CCube(double length, double width, double height)
{
    this->length = length;
    this->width = width;
    this->height = height;
}

CCube::CCube(const CCube & a)
{
    this->length = a.length;
    this->width = a.width;
    this->height = a.height;
}

CCube::~CCube()
{
}

double CCube::GetArea()
{
    return 2 * (length * width + length * height + width * height);
}

double CCube::GetVolume()
{
    return length * width * height;
}

void CCube::Show()
{
    printf("The length = %f\nwidth = %f\nheight = %f\narea = %f\nvolume = %f\n"
    , length, width, height, GetArea(), GetVolume());
}